package com.dj.mingkong.portal.biz.repository.database.system;

import com.dj.mingkong.common.infrastructure.base.dto.query.QueryVo;
import com.dj.mingkong.common.infrastructure.base.repository.BaseDatabaseRepository;
import com.dj.mingkong.common.infrastructure.eo.database.system.UserRoleEo;
import com.dj.mingkong.portal.biz.repository.database.system.mapper.UserRoleMapper;
import org.springframework.stereotype.Repository;

import java.util.List;


/**
 * 用户角色repository
 *
 * @author zenglonghui
 * @date: 2022/5/18 11:44
 */
@Repository
public class UserRoleRepository extends BaseDatabaseRepository<UserRoleMapper, UserRoleEo, QueryVo> {
    public List<UserRoleEo> listByUserId(Long userId) {
        return lambdaQuery().eq(UserRoleEo::getUserId, userId).list();
    }
}
